From c8950712cb95a257e9b08fd11507070f0c221d39 Mon Sep 17 00:00:00 2001
From: Ikey Doherty <ikey@solus-project.com>
Date: Sun, 28 May 2017 00:22:44 +0100
Subject: [PATCH] raven: Mirror the last fix and ensure removed Things have
 cards too

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
---
 src/raven/sound.vala | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/raven/sound.vala b/src/raven/sound.vala
index 9c74203b..8ca6895d 100644
--- a/src/raven/sound.vala
+++ b/src/raven/sound.vala
@@ -347,6 +347,10 @@ public class SoundWidget : Gtk.Box
         }
         var device = this.mixer.lookup_input_id(id);
 
+        if (device.card == null) {
+            return;
+        }
+
         var card = device.card as Gvc.MixerCard;
         var check = new Gtk.RadioButton.with_label_from_widget(this.input_leader, "%s - %s".printf(device.description, card.name));
         (check.get_child() as Gtk.Label).set_ellipsize(Pango.EllipsizeMode.END);
